package com.lanjiu.lib.imclient.dto.user;

import com.lanjiu.lib.imclient.dto.base.Dto;
import com.lanjiu.lib.imclient.ims.IMSContacts;

/**
 * @description:
 * @author: Panwei
 * @date: 2019/11/20 10:49
 */
public class UserDto extends Dto {

    private String userType;

    // 注册用户ID
    private String userId;

    // 密码
    private String secret;

    // 注册用户昵称
    private String nickname;

    // 注册用户手机号码
    private String phone;

    // 头像
    private String avatar;

    public UserDto() {
    }

    public UserDto(TouristsUserDto touristsUser) {
        this.userType = IMSContacts.UserType.TOURISTS_USER;
        this.userId = touristsUser.getTemporaryId();
        this.nickname = touristsUser.getNickname();
        this.avatar = touristsUser.getAvatar();
    }

    public UserDto(RegisteredUserDto registeredUser) {
        this.userType = IMSContacts.UserType.REGISTERED_USER;
        this.userId = registeredUser.getUserId();
        this.secret = registeredUser.getSecret();
        this.avatar = registeredUser.getAvatar();
        this.nickname = registeredUser.getNickname();
        this.phone = registeredUser.getPhone();
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Deprecated
    @Override
    public Object toProtobuf() {
        return null;
    }
}
